<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>Đăng nhập quản lý</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            table td{
                padding-top: 10px;
            }
            table input{
                width: 250px;
                height: 35px;
                font-size: 18px;

                border: 2px solid #BFBFBF;
                border-radius: 3px;
            }
            table input:hover{
                border: 2px solid #73E673;
                color: #009900;
            }

            table input[type=button]{
                background-color: #009900;
                color: #FFF;
                font-weight: bold;
                border: 2px solid #00B200;
                border-radius: 3px;
            }
            table input[type=button]:hover{
                background-color: #00CC00;
            }
        </style>
        <script>
            function validate(){
                var check = true;
                var email = document.getElementById("txtEmail").value;
                var password = document.getElementById("txtPassword").value;
                var fil = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
                if(!fil.test(email) || email.length < 1 || password.length < 1){
                    check = false;
                    alert("Vui lòng nhập email và password.");
                }
                if(check==true){
                    submit();
                }
            }
            
            function submit(){
                document.getElementById("FormLogin").submit();
            }
        </script>
    </head>
    <body style="background-image: url(images/bg.jpg)">
        <form action="Controller" method="post" id="FormLogin">
            <table align="center">
                <tr>
                    <td><img src="images/logo-3.png"/></td>
                </tr>
                <tr>
                    <td style="text-align: center;"><h2>Đăng nhập</h2></td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <input type="text" id="txtEmail" name="txtEmail" placeholder="Email"/>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <input type="password" id="txtPassword" name="txtPassword" onkeypress="if(event.keyCode==13){return validate();}" placeholder="*******"/>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <input type="hidden" name="action" value="Login"/>
                        <input type="button"  onclick="return validate();" value="Đăng nhập"/>
                    </td>
                </tr>
            </table>
        </form>

    </body>
</html>
